<!--HTML-->
<div class="bk-sidebar2" id="bk-sidebar2" style="width: 260px;">
    <div class="sidebar-inner">
        <ul>
            <li class="first-menu">
                <a href="javascript:;">
                <i class="bk-icon icon-pc"></i>概览
            </a>
            </li>
            <li class="first-menu">
                <a href="javascript:;">
                <i class="bk-icon icon-id"></i>角色管理
                <span class="pull-right"></span>
            </a>
            </li>
            <li class="has_submenu first-menu">
                <a href="javascript:;">
                <i class="bk-icon icon-panel-permission"></i>计算
                <span class="pull-right"><i class="bk-icon icon-angle-down angle"></i></span>
            </a>
                <ul class="sub-menu second-menu">
                    <li>
                        <a href="javascript:;">计算一</i></a>
                    </li>
                    <li>
                        <a href="javascript:;">计算二</i></a>
                    </li>
                </ul>
            </li>
            <li class="has_submenu first-menu">
                <a href="javascript:;">
                <i class="bk-icon icon-heart"></i>增强服务
                <span class="pull-right"><i class="bk-icon icon-angle-down angle"></i></span>
            </a>
                <ul class="sub-menu second-menu">
                    <li>
                        <a href="javascript:;">数据储存</a>
                    </li>
                    <li>
                        <a href="javascript:;">告警监控</i></a>
                    </li>
                </ul>
            </li>
            <li class=" first-menu has_submenu">
                <a href="javascript:;">
                <i class="bk-icon icon-script-file"></i>代码管理
                <span class="pull-right"><i class="bk-icon icon-angle-down angle"></i></span>
            </a>
                <ul class="second-menu">
                    <li>
                        <a href="javascript:;">代码一</i></a>
                    </li>
                    <li>
                        <a href="javascript:;">代码二</i></a>
                    </li>
                </ul>
            </li>
        </ul>
    </div>
</div>
<!--JS-->
<script type="text/javascript">
    (function() {
        //bk-sidebar2_js_start
        $("#bk-sidebar2").on("click", "ul .first-menu>a", function() {
            var _this = $(this);
            $(".first-menu>a").removeClass("on");
            $(this).addClass("on");
            _this.parent(".first-menu").siblings().find(".pull-right").removeClass("rate")
            _this.parent(".first-menu").siblings().find(".second-menu").stop().slideUp();
            if (_this.parent(".first-menu").hasClass("has_submenu")) {
                _this.parent(".first-menu").find(".pull-right").toggleClass("rate");
                _this.parent(".first-menu").find(".second-menu").stop().slideToggle();
            } else {
                return false
            }
        })
        //bk-sidebar2_js_end
    })();
</script>
